<style>
  .subscribe-email-section {
    margin: 0;
  }
  .subscribe-mail-wrapper {
    background: #1C473A;
    bottom: 0;
    width: 100%;
    z-index: 10;
    height: 0;
    opacity: 1;
  }
  
  .subscribe-mail-wrapper.isFixed {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 10;
    height: 68px;
    opacity: 1;
    transition: all 0.3s ease-in;
  }
  
  .subscribe-mail-container {
    display: flex;
    padding: 5px 120px;
    align-items: center;
    max-width: 1440px;
  }
  
  .subscribe-mail-wrapper__text {
    flex: 1;
    color: #fff;
    font-weight: 400;
    font-size: 16px;
    line-height: 30px;
  }
  .subscribe-mail-wrapper__text-title {
    font-weight: 700;
    font-size: 16px;
  }
  .subscribe-mail-wrapper__text-item  p {
    margin: 0px;
  }
  .subscribe-mail-wrapper__button {
  }
  .subscribe-mail-wrapper__button .newsletter-form__message--success {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    width: 100%;
    text-align: center;
    display: block;
    line-height: 60px;
    margin: 0;
    position: static;
  }
  
  .subscribe-mail-wrapper .newsletter-form__field-wrapper {
    max-width: 400px;
    min-width: 335px;
  }
  .subscribe-mail-wrapper .newsletter-form__field-wrapper .field__label {
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: #64867C;
    top: 8px;
    left: 17px;
    letter-spacing: 0.2px;
  }
  .subscribe-mail-wrapper .newsletter-form__field-wrapper .field__input {
    border-radius: 30px;
    font-size: 14px;
    line-height: 22px;
    margin: 0;
    background: transparent;
    color: #fff;
    -webkit-text-fill-color: #fff;
    text-fill-color: #fff;
    border: 1px solid #fff;
    box-shadow: none !important;
    font-family: 'Montserrat';
    height: 38px;
  }
  
  .subscribe-mail-wrapper .footer-block_nesletter .field__button span {
    color: #000;
  }
  .subscribe-mail-wrapper .footer-block_nesletter .field__button {
    height: 38px;
    font-family: Montserrat, sans-serif;
    background-color: #fff;
    border: none;
    font-weight: 700;
    font-size: 14px;
    line-height: 24px;
    width: auto;
    padding: 0 20px;
  }
  .add-fixed-menu #shopify-section-footer {
    padding-bottom: 85px;
    background-color: rgb(18, 18, 18);
  }
  
  .subscribe-mail-wrapper__text-desc-mobile {
    display: none;
  }
  
  .subscribe-mail-wrapper .form_message_error {
    font-size: 12px;
    position: relative;
    top: -5px;
    color: #dd6464;
  }
  @media screen and (max-width: 1440px) {
    .subscribe-mail-container {
      padding: 5px 60px;
      max-width: 1320px;
    }
  }
 
  @media screen and (max-width: 1200px) {
    .subscribe-mail-wrapper__text {
      font-size: 14px;
    }
  }
  
  @media screen and (max-width: 1100px) {
    .subscribe-mail-wrapper__text {
      font-size: 13px;
    }
  }
  
  @media screen and (max-width: 900px) {
    .subscribe-mail-container {
      display: flex;
      padding: 0 20px;
      flex-direction: column;
      align-items: normal;
    }
    
    .subscribe-mail-wrapper .form_message_error {
      font-size: 12px;
      position: relative;
      top: -7px;
      color: #dd6464;
    }
    
    .subscribe-mail-wrapper .newsletter-form {
      float: none;
      margin: 0 auto;
    }
    
    .subscribe-mail-wrapper__text-desc {
      display: none;
    }
    .subscribe-mail-wrapper__text-desc-mobile {
      display: block;
    }
    .subscribe-mail-wrapper__text {
      padding: 12px 0;
      text-align: center;
      line-height: 24px;
    }
    .subscribe-mail-wrapper.isFixed {
      height: 125px;
      border-top-left-radius: 12px;
      border-top-right-radius: 12px;
    }
    .subscribe-mail-wrapper .newsletter-form__field-wrapper .field__input {
      height: 35px;
      border-radius: 30px;
    }
    .subscribe-mail-wrapper .footer-block_nesletter .field__button {
      height: 35px;
      width: auto;
      padding: 0 20px;
      border-radius: 30px;
    }
    .subscribe-mail-wrapper .newsletter-form__field-wrapper .field__label {
      letter-spacing: 0;
      top: 7px;
      left: 16px;
    }
    .subscribe-mail-wrapper__button .newsletter-form__message--success {
      margin-top: 37px;
      justify-content: center !important;
    }
    .add-fixed-menu #shopify-section-footer {
      padding-bottom: 140px;
      background-color: rgb(18, 18, 18);
    }
  }
  
  .subscribe-mail-wrapper__button input:-webkit-autofill,
  .subscribe-mail-wrapper__button input:-webkit-autofill:hover,
  .subscribe-mail-wrapper__button input:-webkit-autofill:focus,
  .subscribe-mail-wrapper__button input:-webkit-autofill:active {
    box-shadow: inset 0 0 0 1000px #1C473A !important;
    -webkit-text-fill-color: #fff;
    color: #fff;
    caret-color: #fff;
  }
  
  .subscribe-mail-wrapper__button input:-internal-autofill-selected {
    box-shadow: inset 0 0 0 1000px #1C473A !important;
    -webkit-text-fill-color: #fff;
    color: #fff;
  }
  input:-internal-autofill-selected {
    background-color: #1C473A !important
  }
  
  @media screen and (min-width: 750px) {
    .subscribe-mail-wrapper .newsletter-form {
      max-width: 100%;
      align-items: center;
    }
  }
</style>
<div class="subscribe-mail-wrapper isFixed" id="subscribe-email">
  <div class="subscribe-mail-container page-width">
    {%- form 'customer', id: 'contact-email', class: 'footer__newsletter newsletter-form' -%}
      {%- if form.posted_successfully? -%}
      {%- else -%}
        <div class="subscribe-mail-wrapper__text">
          <div class="subscribe-mail-wrapper__text-item subscribe-mail-wrapper__text-title">
            {{ section.settings.text1 }}
          </div>
          <div class="subscribe-mail-wrapper__text-item subscribe-mail-wrapper__text-desc">
            {{ section.settings.text2 }}
          </div>
          <div class="subscribe-mail-wrapper__text-item subscribe-mail-wrapper__text-desc subscribe-mail-wrapper__text-desc-mobile">
            {{ section.settings.text2_mmobile }}
          </div>
        </div>
      {% endif %}
      <div class="subscribe-mail-wrapper__button">
          {%- if form.posted_successfully? -%}
            <h3 class="newsletter-form__message newsletter-form__message--success form__message {{ form.posted_successfully }}" id="ContactFooter-success" tabindex="-1" autofocus>
              {{ section.settings.success }}
            </h3>
          {% else %}
            <input type="hidden" name="contact[tags]" value="newsletter">
            <input type="hidden" name="success" value="/pages/ago-t-coming-soon?subscribe_ture=true#ContactEmail">
            <div class="newsletter-form__field-wrapper footer-block_nesletter">
              <div class="field">
                <input id="NewsletterForm--{{ section.id }}" type="email" name="contact[email]" class="field__input" value="{{ form.email }}" aria-required="true" autocorrect="off" autocapitalize="off" autocomplete="email"
                  {% if form.errors %}
                    autofocus
                    aria-invalid="true"
                    aria-describedby="ContactFooter-error"
                  {% elsif form.posted_successfully? %}
                    aria-describedby="ContactFooter-success"
                  {% endif %}
                    placeholder="{{ 'newsletter.label' | t }}" required
                >
                <label class="field__label" for="NewsletterForm--{{ section.id }}">
                  {{ section.settings.text3 }}
                </label>
                <button type="submit" class="bg-hover tenways-footer_sub newsletter-form__button field__button" name="commit" id="SubscribeEmail">
                  <span>
                    {{ section.settings.button}}
                  </span>
                </button>
              </div>
              {%- if form.errors -%}
                <small class="newsletter-form__message form__message form_message_error" id="ContactFooter-error">{% render 'icon-error' %}{{ form.errors.translated_fields['email'] | capitalize }} {{ form.errors.messages['email'] }}! and Please try again later.</small>
              {%- endif -%}
            </div>
          {%- endif -%}
      </div>
    {%- endform -%}
  </div>
</div>
<script>
  const urlObj = new URL(location.href);
  $('html').addClass('add-fixed-menu');
  if (urlObj.searchParams.get('customer_posted') === 'true') {
    $(".subscribe-mail-wrapper").addClass("isFixed");
    setTimeout(() => {
      $('html').removeClass('add-fixed-menu');
      $(".subscribe-mail-wrapper").removeClass("isFixed");
    }, 3000);
  }
</script>

{% schema %}
{
  "name": "Subscribe Email",
  "tag": "section",
  "class": "spaced-section spaced-section--full-width subscribe-email-section",
  "settings": [
    {
      "type": "richtext",
      "id": "text1",
      "label": "text1"
    },
    {
      "type": "richtext",
      "id": "text2",
      "label": "text2"
    },
    {
      "type": "text",
      "id": "text2_mmobile",
      "label": "text2 mobile",
      "default": "Only for the first 100 orders."
    },
    {
      "type": "text",
      "id": "text3",
      "label": "text3"
    },
    {
      "type": "text",
      "id": "button",
      "label": "button"
    },
    {
      "type": "text",
      "id": "success",
      "label": "success Label",
      "default": "Thanks for subscribing!"
    }
  ],
  "presets": [{
    "name": "Subscribe Email"
    }
  ]
}
{% endschema %}